<?php
require_once('../../config.php');
Doctrine::loadModels('../../models');

if( $_GET["currency_id"]) // AND $_GET["category_id"] AND $_GET["item_desc"] AND $_GET["item_value"])
{
    $currency_id = strip_tags($_GET["currency_id"]);
    $date_start = strip_tags($_GET["date_start"]);
	$date_end = strip_tags($_GET["date_end"]);
	$exchange_rate = strip_tags($_GET["exchange_rate"]);
	$source_id = strip_tags($_GET["source_id"]);
	
	file_put_contents  ( "params_insert.txt", 
								"currency_id '" .$currency_id.
								"' date_start '" .$date_start.
								"' date_end '" .$date_end.
								"' exchange_rate '" .$exchange_rate.
								"' source_id '" .$source_id."'");
	//add the budget entry
	$finExRate = new FinExchangeRates();
	
	$finExRate->year_start = $currency_id;
	$finExRate->year_end = $date_start;
	$finExRate->comments = $date_end;
	$finExRate->comments = $exchange_rate;
	$finExRate->comments = $source_id;
	$finExRate->deleted = 0;
	/*
	$finExRate->created = $created;
	$finExRate->modified = $modified;
	$finExRate->created_by = $created_by;
	$finExRate->modified_by = $modified_by;
	*/	
	$finExRate->save();
}

?>